home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / System 7.0 Samples / CShell⁄THINK C / CShell.protos < prev    next >
Encoding:
Text File  |  1991-02-20  |  5.3 KB  |  182 lines  |  [TEXT/MPS ]

  1. #ifndef __APPLEEVENTS__
  2. #include <AppleEvents.h>
  3. #endif
  4.  
  5. #ifndef __MENUS__
  6. #include <Menus.h>
  7. #endif
  8.  
  9. #ifndef __STANDARDFILE__
  10. #include <StandardFile.h>
  11. #endif
  12.  
  13. /************** AppleEvents.c **************/
  14.  
  15. void            DoHighLevelEvent(EventRecord *event);
  16. OSErr            GetTargetInfo(AEAddressDesc targetDesc, StringPtr zone, StringPtr machine, StringPtr application);
  17. void            InitAppleEvents(void);
  18. OSErr            MakeTarget(AEAddressDesc *target, Boolean sendDirect, short replyMode, Str255 prompt, Str255 applListLabel,PPCFilterProcPtr portFilter);
  19. Boolean            MissedAnyParameters(AppleEvent *message);
  20. /* 2/20/91 pvh - Pascal based functions! So must pass by reference in THINK C! */
  21. pascal OSErr    DoAEOpenApplication(AppleEvent *message, AppleEvent *reply, long refcon);
  22. pascal OSErr    DoAEOpenDocuments(AppleEvent *message, AppleEvent *reply, long refcon);
  23. pascal OSErr    DoAEPrintDocuments(AppleEvent *message, AppleEvent *reply, long refcon);
  24. pascal OSErr    DoAEQuitApplication(AppleEvent *message, AppleEvent *reply, long refcon);
  25. OSErr            OpenDocEventHandler(AppleEvent *message, AppleEvent *reply, short mode);
  26.  
  27.  
  28.  
  29. /************** AppleEvents2.c **************/
  30.  
  31. void            InitCustomAppleEvents(void);
  32. OSErr            SendConnect(FileRecHndl frHndl);
  33. OSErr            SendMessage(FileRecHndl frHndl, short messageType);
  34. WindowPtr        GetAEWindow(long gameID_0, long gameID_1);
  35. pascal Boolean    MyIdleProc(EventRecord *event, long *sleep, RgnHandle *mouseRgn);
  36. void            NotifyCancel(void);
  37. void            NotifyUser(void);
  38. void            SetOpponentType(FileRecHndl frHndl, short newOpponentType);
  39. pascal Boolean    AEPortFilter(LocationNamePtr locationName, PortInfoPtr thePortInfo);
  40.  
  41.  
  42.  
  43. /************** DoCursor.c **************/
  44.  
  45. void            DoCursor(Boolean isAppleEvent, long classID);
  46. void            DoSetCursor(Cursor *cursor);
  47.  
  48.  
  49.  
  50. /************** DoEvent.c **************/
  51.  
  52. void            DoActivate(WindowPtr window, Boolean becomingActive);
  53. void            DoContentClick(WindowPtr window, EventRecord *event);
  54. void            DoEvent(EventRecord *event);
  55. void            DoUpdate(WindowPtr window);
  56.  
  57.  
  58.  
  59. /************** EventLoop.c **************/
  60.  
  61. void            EventLoop(void);
  62.  
  63.  
  64.  
  65. /************** File.c **************/
  66.  
  67. OSErr            AppDisposeDocument(FileRecHndl frHndl);
  68. Boolean            AppDocumentDirty(FileRecHndl frHndl);
  69. OSErr            AppNewDocument(FileRecHndl *returnHndl);
  70. OSErr            AppOpenDocument(FileRecHndl *result, FSSpecPtr fileToOpen, char permission);
  71. OSErr            AppSaveDocument(FileRecHndl    frHndl, WindowPtr window, short saveMode);
  72. void            ConvertOldToNewSFReply(SFReply *oldReply, StandardFileReply *newReply);
  73. OSErr            Create_OpenFile(FSSpec *file, short *refNum);
  74. Boolean         DisplayGetFile(StandardFileReply *reply);
  75. Boolean         DisplayPutFile(StandardFileReply *reply);
  76. void            IncNewFileNum(Boolean flag);
  77.  
  78.  
  79.  
  80. /************** File2.c **************/
  81.  
  82. void            AppFreeDocument(FileRecHndl frHndl);
  83. OSErr            AppInitDocument(FileRecHndl frHndl);
  84. OSErr            AppReadDocument(FileRecHndl frHndl);
  85. OSErr            AppWriteDocument(FileRecHndl frHndl);
  86. OSErr            AppDuplicateDocument(FileRecHndl oldFrHndl, FileRecHndl *newFrHndl);
  87.  
  88.  
  89.  
  90. /************** Help.c **************/
  91.  
  92. void            DynamicBalloonHelp(void);
  93.  
  94.  
  95.  
  96. /************** IdleTasks.c **************/
  97.  
  98. void            DoIdleTasks(void);
  99. pascal Boolean    MyIdleProc(EventRecord *event, long *sleep, RgnHandle *mouseRgn);
  100. void            NotifyCancel(void);
  101. void            NotifyUser(void);
  102.  
  103.  
  104.  
  105. /************** Init.c **************/
  106.  
  107. void            Initialize(void);
  108. void            StartDocuments(void);
  109.  
  110.  
  111. /************** Menu.c **************/
  112.  
  113. void            AdjustMenus(void);
  114. void            DoMenuCommand(long menuResult);
  115. void            EnableOrDisableItem(MenuHandle menu, short item, Boolean enable);
  116.  
  117.  
  118.  
  119. /************** Print.c **************/
  120.  
  121. OSErr            AppPrintDocument(FileRecHndl frHndl, Boolean jobDlg, Boolean firstJob);
  122. OSErr            PresentStyleDialog(FileRecHndl frHndl);
  123.  
  124.  
  125.  
  126. /************** Setup.c **************/
  127.  
  128. void            DoArrangeBoard(FileRecHndl frHndl, Point clickLoc);
  129. void            DrawPalette(FileRecHndl frHndl);
  130. Rect            PaletteRect(void);
  131.  
  132.  
  133.  
  134. /************** Sound.c **************/
  135.  
  136. OSErr            RecordSound(FileRecHndl frHndl);
  137. Boolean            SoundInputAvaliable(void);
  138.  
  139.  
  140.  
  141. /************** Start.c **************/
  142.  
  143. void            main(void);
  144.  
  145.  
  146.  
  147. /************** Utils.c **************/
  148.  
  149. void            appendi2cstr(char *cstr, short i);
  150. short            appendi2pstr(char *pstr, short i);
  151. short            i2cstr(char *cstr, short i);
  152. void            i2pstr(char *pstr, short i);
  153. pascal Boolean    keyEquivFilter(DialogPtr dlg, EventRecord *event, short *item);
  154. void            pstrcat(char *d, char *s);
  155. void            pstrcpy(char *d, char *s);
  156. void            OffsetControl(ControlHandle ctl, short dx, short dy);
  157. void            DoDrawGrowIcon(WindowPtr window, Boolean horLine, Boolean verLine);
  158. void            DoDrawControls(WindowPtr window, Boolean scrollBarsOnly);
  159. void            DoDraw1Control(ControlHandle ctl, Boolean scrollBarsOnly);
  160.  
  161.  
  162. /************** Window.c **************/
  163.  
  164. OSErr            AppNewWindow(FileRecHndl frHndl, WindowPtr *retWindow);
  165. void            AppNewWindowTitle(WindowPtr window);
  166. Boolean            AppWindowDirty(WindowPtr window);
  167. Boolean            DisposeAllWindows(void);
  168. Boolean            DisposeOneWindow(WindowPtr window, short saveMode);
  169. WindowPtr        SetFilePort(FileRecHndl frHndl);
  170.  
  171.  
  172. /************** Window2.c **************/
  173.  
  174. Boolean            Algebraic(FileRecHndl frHndl, short printMoveNum, short gameIndex, StringPtr pstr);
  175. OSErr            AppNewWindowControls(FileRecHndl frHndl, WindowPtr window);
  176. void            DrawTime(FileRecHndl frHndl);
  177. void            ImageBoardLines(short hOffset, short vOffset);
  178. void            ImageDocument(FileRecHndl frHndl);
  179. void            ImageMoveList(FileRecHndl frHndl, Rect theInk, short hOffset);
  180.  
  181.  
  182.